package com.example.demo.entity.thread;

import java.util.concurrent.Callable;

/**
 * @Author: zcb
 * @Description:
 * @Date: 2021/10/22
 */
public class CallableTask implements Callable<String> {
    private String a;

    public CallableTask(String a) {
        this.a = a;
    }

    @Override
    public String call() throws Exception {
        Thread.sleep((long) Math.random() * 100);
        return this.a + "-" + Math.random();
    }
}
